﻿using DtoFw;
using DtoFw.Interface;
using DtoFw.Query;
using DtoFw.Result;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SceneEvidenceAPISDK
{
    public class ApiCommon : Base, ICommon
    {
        /// <summary>
        /// 获取日志
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public BaseGenericResult<Pager<LogResult>> GetLogs(LogQuery query)
        {
            return HttpTools.Get<BaseGenericResult<Pager<LogResult>>>(query,
                    base.GetApiRouter("GetLogs"));
        }
        /// <summary>
        /// 硬件配置/流程配置调用
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public BaseResult SaveConfigSetting(ConfigSettingDto dto)
        {
            return HttpTools.Post<BaseResult>(dto, base.GetApiRouter("SaveConfigSetting"));
        }
        /// <summary>
        /// 保存预警配置
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public BaseResult SaveWarningConfig(ConfigRequestDto dto)
        {
            return HttpTools.Post<BaseResult>(
                       dto, base.GetApiRouter("SaveWarningConfig"));
        }
    }
}
